package com.cq.hd.member.service;

import com.cq.hd.common.pagination.Page;
import com.cq.hd.member.api.dto.BusinessGroupPageDto;
import com.cq.hd.member.api.dto.BusinessGroupSaveDto;
import com.cq.hd.member.api.vo.BusinessGroupPageVo;
import com.cq.hd.member.po.TbBusinessGroupPo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 商家经纪人分组表 服务类
 * </p>
 *
 * @author mYunYu
 * @since 2023-12-07
 */
public interface TbBusinessGroupService extends IService<TbBusinessGroupPo> {

    List<BusinessGroupPageVo> selectList(BusinessGroupPageDto businessGroupPageDto);

    Page<BusinessGroupPageVo> pageBusinessGroup(BusinessGroupPageDto businessGroupPageDto);

    Long saveBusinessGroup(BusinessGroupSaveDto businessGroupSaveDto);

    Boolean deleteBusinessGroup(Long id, Long businessId, Long agentId);

    // 获取商家/经纪人默认分组，如果没有，初始化一个
    TbBusinessGroupPo getDefaultGroupWithInit(Long businessId, Long agentId);
}
